<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%@page import="com.dss.service.ExpertService"%>
<%@page import="com.dss.po.Expert"%>
<%@page import="com.infomanage.util.Consts"%>
<%  response.addDateHeader("Expires", 0);response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-cache");%>
<%
	request.setCharacterEncoding("UTF-8");
	String expertClassId = request.getParameter("expertClassId");
	String expertId = request.getParameter("expertId");
	if(expertId == null) expertId = "";
	
	Expert expert = ExpertService.loadExpertInfoById(request, response, out);
	String name = "";
	String professionalTitle = "";
	String description = "";
	String photoName = "";
	String photoPath = "photo.jpg";
	if(expert != null){
		name = expert.getName();
		professionalTitle = expert.getProfessionalTitle();
		description = expert.getDescription();
		photoName = expert.getPhoto();
		photoPath = request.getRealPath(Consts.FILE_UPLOAD_SAVE_DIR) + "/" + photoName; 
	}
%>
<html>
	<head>
		<title>专家信息</title>
		<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
		<link href="../../css/table.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="../../js/common.js"></script>
		<script type="text/javascript">
			function doSubmit(){
			 	if("" == "<%=expertId%>") {
					form1.actionType.value = "add";
			 	}else{
			 		form1.actionType.value = "modify";
				 }
		 		form1.submit();
			}

		    function showError(error){
			    alert(error);
		    }

		    function showInfo(info){
			   alert(info);
			   window.returnValue = "ok";
			   window.close();
		    }
		</script>
	</head>
	<body rightmargin="0" bottommargin="0" leftmargin="0" topmargin="0">
		<form name="form1" action="expert_info_action.jsp" method="post" target="actionFrame" enctype='multipart/form-data'>
		<input type="hidden" name="expertId" value="<%=expertId %>">
		<input type="hidden" name="actionType">
		<input type="hidden" name="expertClassId" value="<%=expertClassId%>">
		<table class="dialogTable" cellpadding="0" cellspacing="0">
			<!-- 表头-->
			<tr class="dialogTableHeader">
				<td>
					专家信息
				</td>
			</tr>
			<!-- 表数据-->
			<tr class="dialogTableContent">
				<td>
					<!-- 数据项 -->
					<table class="dataTable">
						<col width="30%">
						<col width="70%">
						<tr height="170px" >
							<td class="field" align="center" height="165px">
								照片
							</td>
							<td align="center">
								<img src="<%=photoPath %>">
							</td>
						</tr>
						<tr>
							<td class="field" align="center">
								专家姓名
							</td>
							<td align="center">
								<%=name %>
							</td>
						</tr>
						<tr >
							<td class="field" align="center">
								职称
							</td>
							<td align="center">
								<%=professionalTitle %>
							</td>
						</tr>
						<tr height="100px">
							<td class="field"  align="center">
								专家介绍
							</td>
							<td align="center" style="height: 100px">
								<%=description %>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td colspan="2" class="tableBtn">
					<span onclick="window.close();">关闭</span>
				</td>
			</tr>
			<tr valign="top">
				<td colspan="2">
					&nbsp;
				</td>
			</tr>
		</table>
		</form>
	</body>
	<iframe src="#" name="actionFrame" style="display: none;"></iframe>
</html>
